package com.zlc.common.core.user.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.zlc.common.common.service.BaseServiceImpl;
import com.zlc.common.core.user.mapper.MayanPlatLoginUserMapper;
import com.zlc.common.core.user.model.entity.MayanPlatLoginUser;
import com.zlc.common.core.user.model.vo.MayanPlatLoginUserVo;
import com.zlc.common.core.user.service.MayanPlatLoginUserService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author  zl
 * @date 2023-05-08 
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class MayanPlatLoginUserServiceImpl extends BaseServiceImpl<MayanPlatLoginUserMapper, MayanPlatLoginUser, MayanPlatLoginUserVo> implements MayanPlatLoginUserService {

    @Override
    public MayanPlatLoginUserVo queryByToken(String token) {
        LambdaQueryWrapper<MayanPlatLoginUser> wrapper = wrapper().eq(MayanPlatLoginUser::getToken, token);
        return queryOne(wrapper);
    }
}
